package com.qf.qftenantmanager.service;

import com.qf.common.bean.R;
import com.qf.common.feigns.DeviceApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.concurrent.ExecutionException;

@Service
public class DeviceService {

    @Autowired
    private DeviceApi deviceApi;

    public R countByTenantId(Long tenantId, int deleted) {
        return deviceApi.count(tenantId,deleted);
    }

    public R listByTenant(Long tenantId) throws ExecutionException, InterruptedException {
        return deviceApi.listByTenant(tenantId);
    }

    public R get(Long deviceId) {
        return deviceApi.get(deviceId);
    }
}
